<?php
function main(){
	$power=getdataf('power','usertable','userid',$_SESSION['userid']);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
	<title>人员管理系统</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="../views/css/re.css">
	<link rel="stylesheet" type="text/css" href="../views/css/index.css">
	<script type="text/javascript" src="../views/js/index.js"></script>
</head>
<body>
	<div class="body">
	<?php 

		include('../views/user.php');
		include('../views/updatepw.php');
		if($power==3)
		{
			include('../views/apply.php');
			apply();
			$class=getdataallf('classid','class');
			foreach ($class as $key => $value) {
				if($value!=0)
				{
					user($value);
				}
			}
			
		}
		else
		{
			include('../views/userinformation.php');
			userinformation($_SESSION['userid']);
			$classid=getdataf('classid','usertable','userid',$_SESSION['userid']);
			user($classid);

		}
		updatepw($_SESSION['userid']);
		
	?>
	
	</div>	
</body>
</html>

<?php
}
?>

